package com.jade.store.pay.service;

import com.jade.bss.DbException;
import com.jade.bss.base.customer.Customer;
import com.jade.bss.db.BaseFacade;
import com.jade.store.pay.entity.PayOrder;
import com.jade.store.pay.entity.PayReturnOrder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 支付和星类
 * User: JinYa 2009_jinya@163.com
 * Date: 2016-11-10
 * Time: 19:03
 * Version : 1.0
 * Remark:
 * History:
 */
public interface PayOrderFacade extends BaseFacade {
    /**
     * JS 微信支付
     * @return 二维码地址
     * @throws DbException
     */
    PayOrder successPay(Customer customer, PayOrder payOrder)throws DbException;
    /**
     * JS 微信支付
     * @return 二维码地址
     * @throws DbException
     */
    PayOrder getWxJsPayCode(Customer customer, PayOrder payOrder)throws DbException;
    /**
     *
     * @return 二维码地址
     * @throws DbException
     */
    PayOrder getWxPayQRCode(Customer customer, PayOrder payOrder) throws DbException;
    PayOrder getWxScanPay(Customer customer, PayOrder payOrder) throws DbException;
    /**
     *
     * @return 微信APP支付
     * @throws DbException
     */
    PayOrder wxAppPay(Customer customer, PayOrder payOrder) throws DbException;
    PayOrder getAppPay(Customer customer, PayOrder payOrder) throws DbException;
    /**
     * 支付宝手机网站支付
     * @return 二维码地址
     * @throws DbException
     */
    PayOrder getAliPayQRCode(Customer customer, PayOrder payOrder) throws DbException;
    PayOrder getAliPayWap(Customer customer, PayOrder payOrder) throws DbException;
    PayOrder getAliScanPay(Customer customer, PayOrder payOrder) throws DbException;
    /**
     * 微信支付結果返回
     * @return 二维码地址
     * @throws DbException
     */
    PayReturnOrder getWxPayReturn(HttpServletRequest request) throws DbException;

    PayOrder aliWapPay(Customer customer, PayOrder payOrder, HttpServletResponse response) throws DbException;

    PayOrder getReturnOrder(PayOrder payOrder)throws DbException;
    PayOrder cancelOrder(PayOrder payOrder)throws DbException;

    PayOrder getReturnOrder(Customer customer, String outTradeNo)throws DbException;
    PayOrder cancelOrder(Customer customer, String outTradeNo)throws DbException;
}
